package com.ap.generator.registerconsumer;

import com.ap.core.cxf.jaxb.common.AbstractCredentialsTypeGeneratorBuilder;
import com.ap.datagen.lang.IntegerRandomGeneratorBuilder;

import static com.ap.datagen.core.Nullable.nullable;
import static com.ap.datagen.lang.StringRandomGeneratorBuilder.stringRandomGeneratorBuilder;

/**
 *   Credential Type Generator Builder
 */
public class CredentialTypeGeneratorBuilder extends AbstractCredentialsTypeGeneratorBuilder {

    @Override
    public void setupDefaults() {
        this.emailIdGenerator = nullable(stringRandomGeneratorBuilder().alphabeticUppper().length(15).build());
        this.passwordGenerator = nullable(stringRandomGeneratorBuilder().hexadecimal().length(64).build());
        this.saltGenerator = nullable(stringRandomGeneratorBuilder().hexadecimal().length(16).build());
    }

    public static CredentialTypeGeneratorBuilder getCredentialTypeGenerator() {
        return new CredentialTypeGeneratorBuilder();
    }

}
